/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Objekte;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import logging.Logger;

/**
 * Nur für den Admin
 * Für die anzeige eine Liste an usern welceh der Admin editieren kann
 * @author benji
 */
public class User {

    private int id;
    private String name;
    private String pwHash;
    private int guthaben;
    private boolean isAdmin = false;
    private int rank;
    private String ran_string;


    
    private boolean isOnline;
    private String rankString;
    private Date anmeldung;
    private String anmeldeDatumString;

    public User(int userId, String Username, String Userpw, boolean isOnline, int geld, int rank, boolean isAdmin, String rankString) {
        this.id = userId;
        this.name = Username;
        this.pwHash = Userpw;
        this.isOnline = isOnline;
        this.guthaben = geld;
        this.rank = rank;
        this.isAdmin = isAdmin;
        this.rankString = rankString;
        this.anmeldung = new Date(System.currentTimeMillis());
        SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy HH:mm", Locale.GERMANY);
        this.anmeldeDatumString = format.format(this.anmeldung);
    }

    public String getRan_string() {
        return ran_string;
    }

    public void setRan_string(String ran_string) {
        this.ran_string = ran_string;
    }

    public User() {
    }

    public int getId() {
        Logger.debug("User - getID");
        return id;
    }

    public void setId(int id) {
        Logger.debug("User - setID");
        this.id = id;
    }

    public int getGuthaben() {
        Logger.debug("User - getGuthaben");
        return guthaben;
    }

    public void setGuthaben(int guthaben) {
        Logger.debug("User - setGuthaben");
        this.guthaben = guthaben;
    }

    public boolean isIsAdmin() {
        Logger.debug("User - isIsAdmin");
        return isAdmin;
    }

    public void setIsAdmin(boolean isAdmin) {
        Logger.debug("User - setIsAdmin");
        this.isAdmin = isAdmin;
    }

    public String getName() {
        Logger.debug("User - getName");
        return name;
    }

    public void setName(String name) {
        Logger.debug("User - setNAme");
        this.name = name;
    }

    public String getPwHash() {
        Logger.debug("User - getPWHash");
        return pwHash;
    }

    public void setPwHash(String pwHash) {
        Logger.debug("User - setPWHash");
        this.pwHash = pwHash;
    }

    public int getRank() {
        Logger.debug("User - getRank");
        return rank;
    }

    public void setRank(int rank) {
        Logger.debug("User - setRank");
        this.rank = rank;
    }

    public String getRankString() {
        Logger.debug("User - getRankString");
        return rankString;
    }

    public void setRankString(String rankString) {
        Logger.debug("User - setRankString");
        this.rankString = rankString;
    }

    public Date getAnmeldung() {
        Logger.debug("User - getAnmeldung");
        return anmeldung;
    }

    public void setAnmeldung(Date anmeldung) {
        Logger.debug("User - setAnmeldung");
        this.anmeldung = anmeldung;
    }

    public boolean isIsOnline() {
        Logger.debug("User - isIsOnline");
        return isOnline;
    }

    public void setIsOnline(boolean isOnline) {
        Logger.debug("User - setIsOnline");
        this.isOnline = isOnline;
    }

    public String getAnmeldeDatumString() {
        return anmeldeDatumString;
    }

    public void setAnmeldeDatumString(String anmeldeDatumString) {
        this.anmeldeDatumString = anmeldeDatumString;
    }

    
}
